<template>
       <section class="main">
      <ul class="todo-list" v-for="(item, index) in list" :key="item.id">
        <li class="todo" >
          <div class="view">
            <span class="index">{{index+1}}.</span> <label>{{item.name}}</label>
            <button class="destroy" @click="del(item.id)"></button>
          </div>
        </li>
      </ul>
    </section>
</template>
<script>
export default {
    props: ['list'],
    methods: {
        del(value) {
            this.$emit('del',value)
        }
    }
}
</script>